/*--------------------------------------------------------------------------------------*\
**
** quest_log_window.h
**
** Heroes IV
** Copyright 2001, The 3DO Company
**
\*--------------------------------------------------------------------------------------*/

#ifndef QUEST_LOG_WINDOW_H_INCLUDED
#define QUEST_LOG_WINDOW_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#pragma warning( disable: 4786 )

#include "vector"

#include "adv_map_point.h"
#include "bitmap_group_ptr.h"
#include "game_window.h"

class t_adventure_frame;
class t_adventure_map;
class t_bitmap_layer_window;
class t_button;
class t_center_map_window; // Defined in dialog_teleporter_entrance.cpp
class t_scrollbar;
class t_text_window;

class t_quest_log_window : public t_window
{

public:
	t_quest_log_window( t_window* parent, t_adventure_frame* frame );

protected:
	struct t_quest_entry {
		const char		*text;
		t_adv_map_point	location;
	};

    t_adventure_frame*						m_frame;
	t_bitmap_group_ptr						m_bitmaps_ptr;
    int										m_current_quest_index;
	std::vector<t_quest_entry>				m_data;
    t_adventure_map*						m_map;
    std::vector<t_button *>					m_map_button_list;
	t_bitmap_layer_window*                  m_map_frame;
	std::vector<t_window *>					m_marker_window_list;
	std::vector<t_center_map_window *>      m_mini_map_list;
	std::vector<t_screen_point>				m_screen_frame_points;
	t_scrollbar *							m_scrollbar;
	std::vector<t_window*>					m_text_background_list;
	std::vector<t_text_window*>				m_text_window_list;

    void close_clicked( t_button* button_ptr );
    void create_quests_windows();
	void gather_data();
    void mini_map_clicked( t_button* button_ptr, int index );
    void scrollbar_move( t_scrollbar* scrollbar, int value );
    void show_quests( int start_index );
};

#endif
